load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(
    licenses = ["notice"],  # Apache 2.0
)

go_library(
    name = "go_default_library",
    srcs = [
        "bindings.go",
        "comprehensions.go",
        "encoders.go",
        "extension_option_factory.go",
        "formatting.go",
        "formatting_v2.go",
        "guards.go",
        "lists.go",
        "math.go",
        "native.go",
        "protos.go",
        "regex.go",
        "sets.go",
        "strings.go",
    ],
    importpath = "github.com/google/cel-go/ext",
    visibility = ["//visibility:public"],
    deps = [
        "//cel:go_default_library",
        "//checker:go_default_library",
        "//common:go_default_library",
        "//common/ast:go_default_library",
        "//common/decls:go_default_library",
        "//common/env:go_default_library",
        "//common/operators:go_default_library",
        "//common/overloads:go_default_library",
        "//common/types:go_default_library",
        "//common/types/pb:go_default_library",
        "//common/types/ref:go_default_library",
        "//common/types/traits:go_default_library",
        "//interpreter:go_default_library",
        "//parser:go_default_library",
        "@org_golang_google_protobuf//proto:go_default_library",
        "@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
        "@org_golang_google_protobuf//types/known/structpb",
        "@org_golang_x_text//language:go_default_library",
        "@org_golang_x_text//message:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    size = "small",
    srcs = [
        "bindings_test.go",
        "comprehensions_test.go",
        "encoders_test.go",
        "extension_option_factory_test.go",
        "formatting_test.go",
        "formatting_v2_test.go",
        "lists_test.go",
        "math_test.go",
        "native_test.go",
        "protos_test.go",
        "regex_test.go",
        "sets_test.go",
        "strings_test.go",
    ],
    embed = [
        ":go_default_library",
    ],
    deps = [
        "//cel:go_default_library",
        "//checker:go_default_library",
        "//common:go_default_library",
        "//common/env:go_default_library",
        "//common/types:go_default_library",
        "//common/types/ref:go_default_library",
        "//common/types/traits:go_default_library",
        "//test:go_default_library",
        "//test/proto2pb:go_default_library",
        "//test/proto3pb:go_default_library",
        "@org_golang_google_protobuf//encoding/protojson:go_default_library",
        "@org_golang_google_protobuf//proto:go_default_library",
        "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
    ],
)
